

<!-- Right side column. Contains the navbar and content of the page -->
<aside class="right-side">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>Add User </h1>
    </section>
    <!-- Main content -->
    <section class="content">
        <div class="row">
            <!-- left column -->
            <div class="col-md-12">
                <!-- general form elements -->
                <div class="box box-primary">
                    <?php
                    $msg = $this->session->flashdata('msg');
                    if ($msg != '') {
                        ?>
                        <div class="alert alert-warning alert-dismissable">
                            <i class="fa fa-warning"></i>
                            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                            <b>Alert!</b> <?php echo $msg; ?>
                        </div>
                    <?php }
                    ?>
                    <!-- form start -->
                    <form role="form" method="POST" action="" name="editregistration" >
                        <div class="box-body"><?php foreach ($user as $data) { ?>
                                <div class="form-group">
                                    <label for="username">Username</label>
                                    <input type="text" class="form-control" id="username" placeholder="username" name="username" value="<?php echo $data->username; ?>" onblur="user_check(this.value);
                                           " disabled><div id="Msg"></div>
                                </div>
                                <div class="form-group">
                                    <label for="name">Name</label>
                                    <input type="text" class="form-control" id="name" placeholder="Enter Name" name="name" value="<?php echo $data->name; ?>">
    <?php echo form_error('name'); ?>
                                </div>
                                <div class="form-group">
                                    <label for="name">Gender</label><br>
                                    <input type="radio" name="gender" value="Male" <?php $gen = $data->gender;
    if ($gen == 'Male') { ?>checked <?php } ?> >Male&nbsp;
                                    <input type="radio" name="gender" value="Female" <?php $gen = $data->gender;
    if ($gen == 'Female') { ?> checked <?php } ?>>Female
                                </div>
                                <div class="form-group">
                                    <label for="email">Email address</label>
                                    <input type="email" class="form-control" id="email" placeholder="Enter email" name="email" value="<?php echo $data->email; ?>" disabled>

                                </div>
                                <div class="form-group">
                                    <label for="Address">Address</label>
                                    <input type="text" class="form-control" id="address" placeholder="Address (optional)" name="address" value="<?php echo $data->address; ?>">

                                </div>
                     
                            <div class="form-group">
                                <label for="Address">Phone</label>
                                <input type="tel" class="form-control" id="phone" placeholder="Phone Number" name="phone" value="<?php echo $data->phone; ?>">
 <?php echo form_error('phone'); ?>
                                    <?php } ?> 
                            </div>
                        </div><!-- /.box-body -->
                </div>
                <div class="box-footer">
                    <button type="submit" class="btn btn-primary" name="submit">Update Profile</button></form>
                </div>
                
            </div><!-- /.box -->
        </div></div>
    </section></aside>


